During the processing of digital color images, many operations are performed in order to improve the quality of the final image. For example, the color gamut of a digital camera may include colors that are not reproducible on the destination printer. In these cases, as is well known in the art, there are a variety of ways to adjust such out of gamut colors to bring the out of gamut colors into the printer's gamut.
One conventional methodology to adjust such out of gamut colors to bring the out of gamut colors into the printer's gamut is to map each color to the closest color within the printer's gamut. Another methodology compensates for out of gamut colors by considering the pixels in a neighborhood of the image around an affected pixel and adjusting the out of gamut color accordingly.
Conventional methods seek to minimize artifacts, or equivalently, maximize image quality when converting between color definitions that are limited by physical device gamuts, such as those of an ink jet or xerographic printer. However, this is not the only case where artifacts can arise from color space transformations occur. Another case is the transformation between mathematical color spaces.
For example, it may be more convenient to perform certain color modifications to an image in a color space that represents each pixel as a luminance-like coordinate and two color (chrominance) coordinates than to process the image in a color space that represents each pixel in a device-dependent color representation such as RGB or CMYK.
Examples of color spaces that represent each pixel as a luminance-like coordinate and two color (chrominance) coordinates (luminance-chrominance color spaces) include YCbCr, L*a*b*, HVC, etc. Moreover, examples of device-dependent color spaces include RGB, CMY, CMYK, etc. It should be noted that all (RGB, etc.) color spaces are considered in the same way, even if the color spaces might have a colorimetric definition.
Since many images are conventionally created in device-dependent color spaces; which represent each pixel in e.g. RGB or CMYK color space; to perform certain color modifications, the originally generated image may need to be transformed to an alternative color space.
Implicit in the definition of a color space is the existence of a color gamut of the color space itself, independent of any particular physical device.
This color space gamut arises due to constraints imposed by the digital encoding of a given color space. For example, an 8-bit encoding of sRGB values is a mapping from the real interval [0, 1] to the discrete interval [0, 255] and represents a finite gamut of colors within the larger space of visually perceivable colors.
More importantly, different color spaces have different encoding gamuts. That is colors that are representable in one color space encoding may not be within the encoding of another color space. When a transformation is applied from one color space to another color space, colors outside of the gamut must somehow be mapped within the valid encoding of the output color space. Improper mapping can give rise to artifacts, in particular to loss of spatial detail.
Since the concept of a color gamut is commonly associated with the colors that are reproducible by a physical device like a camera or printer, it is not usual to think of the colors that are representable in a particular color space as a gamut. However, as explained above, color space transformations can give rise to some of the same artifacts that arise when transforming colors between devices.
Therefore, it would be desirable to transform from one color space to another color space that minimizes the loss of spatial detail due to gamut constraints of the color spaces involved.